%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% This file is part of the book
%%
%% Cryptography
%% http://code.google.com/p/crypto-book/
%%
%% Copyright (C) 2010 Minh Van Nguyen <nguyenminh2@gmail.com>
%%
%% See the file COPYING for copying conditions.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\dontprintsemicolon
\BlankLine
%%
%% algorithm body
Alice and Bob publicly agree on a cryptosystem $(E,D)$.\;
\For{\rm each message $M$ from Alice to Bob}{
  Alice and Bob agree on a secret key $K$.\nllabel{alg:secret_key_agreement}\;
  Alice computes $C = E_K(M)$ and sends it to Bob.\;
  Bob computes $M = D_K(C)$ to obtain the plaintext.\;
}
